<script>
    $(document).ready(function(e) {
        $('#myform').submit(function(){
            var addondata={
                
            };
            var options = {
                data:addondata,
                type: "post",
                beforeSubmit: function(){},
                success: function(data){
                    if(parseInt(data.code)>0){
                        alert(data.msg);	
                        <% if (AA=='mod'){ %>location.href=$('input[name=FORWARD]').val();<% }else{ %>location.reload();<% } %>
                    }else{
                        alert(data.msg);
                    }
                },
                dataType: "json",
                clearForm: false,
                resetForm: false,
                timeout: 5000
            };
            $(this).ajaxSubmit(options);
            
            return false;	
        });
        
    });
    </script>